Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 5 - Menu Manager Reference / Menu Manager Functions
Manipulating and Accessing Menu Item Characteristics /


SetMenuItemModifiers

NEW WITH THE APPEARANCE MANAGER

Sets the modifier key(s) that must be pressed with a character key to select a particular menu item.

pascal OSErr SetMenuItemModifiers (
                     MenuHandle inMenu,
                     SInt16 inItem,
                     SInt16 inModifiers);
inMenu
The handle to the menu structure of the menu item for which you wish to set the modifier key(s).
inItem
An integer representing the item number of the menu item for which you wish to set the modifier key(s).
inModifiers
A value representing the modifier key(s) to be used in selecting the menu item; see "Modifier Key Mask Constants".
function result
A result code; see "Result Codes".
DISCUSSION
You can call the SetMenuItemModifiers function to change the modifier key(s) you can include with a character key to create your keyboard equivalent. For example, you can change Command-x to Command-Option-Shift-x. By default, the Command key is always specified; however, you can remove the Command key by setting the kMenuNoCommand flag in the modifier keys field of an extended menu item entry in the 'xmnu' resource; see "The Extended Menu Resource".

SEE ALSO
"Appearance Manager Gestalt Selector Constants".

GetMenuItemModifiers.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998